package com.zack.designPattern.flyweight;

import java.util.ArrayList;
import java.util.List;

public class UnsharedFlyWeightPersonalMenu implements FlyWeightMenu {

	List<FlyWeightMenu> commonMenues;
	
	private String name;
	
	public UnsharedFlyWeightPersonalMenu(String name){
		this.name = name;
		this.commonMenues = new ArrayList<FlyWeightMenu>();
	}
	
	public void addCommonMenu(FlyWeightMenu commonMenu){
		commonMenues.add(commonMenu);
	}
	
	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public void orderDish(String customer, String dishName) {
		System.out.println(customer+"从"+name+"菜谱中点了"+dishName);

	}

}
